//
//  XHQBaseScrollView.m
//  西楚网
//
//  Created by 徐汉卿 on 16/7/1.
//  Copyright © 2016年 徐汉卿. All rights reserved.
//

#import "XHQBaseScrollView.h"

@implementation XHQBaseScrollView

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self  = [super initWithFrame:frame]) {
//        self.bounces = NO;
        self.contentView = [UIView new];
        self.contentView.backgroundColor = [UIColor clearColor];

        [self addSubview:self.contentView];
        //更具contentView的大小决定scollview的contentSize
        //下面的方法需在外界调用  让contentView 有个范围
        /**
         *    [sv.contentView mas_updateConstraints:^(MASConstraintMaker *make) {
         make.bottom.equalTo(headerView);
         }];
         *       
         */
        
        //xhqxhq这里的代码意思不明确http://adad184.com/2015/12/01/scrollview-under-autolayout/
        [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.equalTo(self);
//            make.height.equalTo(self);
            //
//            make.width.mas_equalTo(kScreenWidth);
            make.left.right.top.bottom;
//            make.edges.equalTo(self);
            self.contentView.backgroundColor =[UIColor yellowColor];

        }];
    }
    return self;
}








@end
